fix(ci): split runtime and dev dependency audits (#313)#314
Merged
liujuanjuan1984 merged 1 commit intomainfrom Mar 25, 2026
Merged
fix(ci): split runtime and dev dependency audits (#313)#314liujuanjuan1984 merged 1 commit intomainfrom
liujuanjuan1984 merged 1 commit intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更说明
本 PR 将阻塞型依赖审计限制为 runtime 依赖,并把 dev 工具链依赖的漏洞检查留在现有
dependency-health通道中。具体调整
CIworkflow 改为基于uv.lock导出的 runtime requirements 执行阻塞型pip-auditPublishworkflow 同样只对 runtime requirements 执行阻塞型pip-auditscripts/dependency_health.sh改为导出devextra 依赖图并执行 dev dependency auditscripts/README.md补充 runtime blocking / dev visibility 的脚本说明背景与原因
当前仓库与另一仓库存在同类问题:
CI/Publish在安装--all-extras后直接执行uv run pip-audit,导致pytest -> pygments、pip-audit -> rich -> pygments这类 dev 工具链依赖的漏洞也会阻塞主线 CI 和发版流程。当前已复现
pygments 2.19.2 / CVE-2026-4539。它不是 runtime 依赖,因此更合理的策略是:验证记录
bash -n scripts/dependency_health.shgit diff --checkbash ./scripts/doctor.sh364 passeduv export --format requirements.txt --no-dev --locked --no-emit-project --output-file /tmp/opencode-runtime-req-final.txt >/dev/null && uv run pip-audit --requirement /tmp/opencode-runtime-req-final.txtNo known vulnerabilities foundbash ./scripts/dependency_health.shpygments 2.19.2 / CVE-2026-4539,符合“保留 dev 依赖风险可见性”的预期关联 Issue